package org.tuoren.official.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.tuoren.common.excel.annotation.ExcelDictFormat;
import org.tuoren.common.excel.convert.ExcelDictConvert;
import org.tuoren.official.domain.Annex;
import org.tuoren.official.domain.TNewsCenter;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import java.util.List;


/**
 * 新闻中心配置视图对象 t_news_center
 *
 * @author Lion Li
 * @since 2024-11-26
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = TNewsCenter.class)
public class TNewsCenterVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @ExcelProperty(value = "主键")
    private Long id;

    /**
     * 标题
     */
    @ExcelProperty(value = "标题")
    private String title;

    /**
     * 封面图地址
     */
    @ExcelProperty(value = "封面图地址")
    private String coverUrl;

    /**
     * 描述
     */
    @ExcelProperty(value = "描述")
    private String newDesc;

    /**
     * 内容
     */
    @ExcelProperty(value = "内容")
    private String content;

    /**
     * 来源
     */
    @ExcelProperty(value = "来源")
    private String source;

    /**
     * 发布时间
     */
    @ExcelProperty(value = "发布时间")
    private Date publishDate;

    @ExcelProperty(value = "格式化发布时间")
    private String publishDateFormat;

    /**
     * 是否发布（0：否；1：是）
     */
    @ExcelProperty(value = "是否发布", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "0=：否；1：是")
    private String isPublish;
    @TableField(exist = false)
    private List<Annex> annexList;
    private String fileList;
}
